package system.data;

/* @(#)/system/base/C:\\Documents and Settings\\Administrator\\����\\APEP3\\JavaSourceOutput\ProductTypeManagerBase.java    V1.0
 *
 * Project: APEP 
 *
 * Modify Information:
 * =============================================================================
 *   Author       Date       Description
 *   ------------ ---------- ---------------------------------------------------
 *   ��ة��    {CREATE_TIME} First release
 *
 * Copyright Notice:
 * =============================================================================
 *    Copyright (c) 2001-2007 Auto-Parts E-Procurement Co., Ltd. 
 *        No.251-1 Wuning Road, Shanghai, 200063, China All rights reserved.
 *
 *    This software is the confidential and proprietary information of
 *        Auto-Parts E-Procurement Co., Ltd. ("Confidential Information").
 *        You shall not disclose such Confidential Information and shall use it
 *        only in accordance with the terms of the license agreement you entered
 *        into with APEP.
 *
 * Warning:
 * =============================================================================
 *   
 * 
 */

import java.util.*;

import framework.core.*;
/*
	Author    :��ة��
	CreateTime:{CREATE_TIME}
*/
public class ProductTypeManagerBase extends Table 
{
public static final String TABLE_NAME = "t_product_type_manager";

private static final String BACKUP_TABLE_NAME = "t_product_type_manager_BACKUP";

private static final String BACKUP_SEQ_NAME = "S_PRODUCT_TYPE_MANAGER_BACKUP";


public static final String ID = "ID";

public static final String PRODUCT_TYPE = "PRODUCT_TYPE";

public static final String TYPE_NAME = "TYPE_NAME";

public static final String REMARK = "REMARK";

public static final String TYPE_LEVEL = "TYPE_LEVEL";

public static final String UPPER_TYPE = "UPPER_TYPE";

public static final String STATUS = "STATUS";

public static final String CREATE_USER_ID = "CREATE_USER_ID";

public static final String CREATE_USER = "CREATE_USER";

public static final String CREATE_TIME = "CREATE_TIME";

public static final String LAST_UPDATE_USER_ID = "LAST_UPDATE_USER_ID";

public static final String LAST_UPDATE_USER = "LAST_UPDATE_USER";

public static final String LAST_UPDATE_TIME = "LAST_UPDATE_TIME";


public static Vector m_fields = null;


private String m_ID = ""; //ID

private String m_PRODUCT_TYPE = ""; //TYPE_CODE

private String m_TYPE_NAME = ""; //TYPE_NAME

private String m_REMARK = ""; //REMARK

private String m_TYPE_LEVEL = ""; //TYPE_LEVEL

private String m_UPPER_TYPE = ""; //UPPER_CODE

private String m_STATUS = ""; //STATUS

private String m_CREATE_USER_ID = ""; //CREATE_USER_ID

private String m_CREATE_USER = ""; //CREATE_USER

private String m_CREATE_TIME = ""; //CREATE_TIME

private String m_LAST_UPDATE_USER_ID = ""; //LAST_UPDATE_USER_ID

private String m_LAST_UPDATE_USER = ""; //LAST_UPDATE_USER

private String m_LAST_UPDATE_TIME = ""; //LAST_UPDATE_TIME



	public String getId()
	{
	    return m_ID;
	}
	public void  setId(String v)
	{
		if(getId().equals(v)) return ;
		m_ID = v ;
		markDirty(ID);
	}

	public String getProductType()
	{
	    return m_PRODUCT_TYPE;
	}
	public void  setProductType(String v)
	{
		if(getProductType().equals(v)) return ;
		m_PRODUCT_TYPE = v ;
		markDirty(PRODUCT_TYPE);
	}

	public String getTypeName()
	{
	    return m_TYPE_NAME;
	}
	public void  setTypeName(String v)
	{
		if(getTypeName().equals(v)) return ;
		m_TYPE_NAME = v ;
		markDirty(TYPE_NAME);
	}

	public String getRemark()
	{
	    return m_REMARK;
	}
	public void  setRemark(String v)
	{
		if(getRemark().equals(v)) return ;
		m_REMARK = v ;
		markDirty(REMARK);
	}

	public String getTypeLevel()
	{
	    return m_TYPE_LEVEL;
	}
	public void  setTypeLevel(String v)
	{
		if(getTypeLevel().equals(v)) return ;
		m_TYPE_LEVEL = v ;
		markDirty(TYPE_LEVEL);
	}

	public String getUpperType()
	{
	    return m_UPPER_TYPE;
	}
	public void  setUpperType(String v)
	{
		if(getUpperType().equals(v)) return ;
		m_UPPER_TYPE = v ;
		markDirty(UPPER_TYPE);
	}

	public String getStatus()
	{
	    return m_STATUS;
	}
	public void  setStatus(String v)
	{
		if(getStatus().equals(v)) return ;
		m_STATUS = v ;
		markDirty(STATUS);
	}

	public String getCreateUserId()
	{
	    return m_CREATE_USER_ID;
	}
	public void  setCreateUserId(String v)
	{
		if(getCreateUserId().equals(v)) return ;
		m_CREATE_USER_ID = v ;
		markDirty(CREATE_USER_ID);
	}

	public String getCreateUser()
	{
	    return m_CREATE_USER;
	}
	public void  setCreateUser(String v)
	{
		if(getCreateUser().equals(v)) return ;
		m_CREATE_USER = v ;
		markDirty(CREATE_USER);
	}

	public String getCreateTime()
	{
	    return m_CREATE_TIME;
	}
	public void  setCreateTime(String v)
	{
		if(getCreateTime().equals(v)) return ;
		m_CREATE_TIME = v ;
		markDirty(CREATE_TIME);
	}

	public String getLastUpdateUserId()
	{
	    return m_LAST_UPDATE_USER_ID;
	}
	public void  setLastUpdateUserId(String v)
	{
		if(getLastUpdateUserId().equals(v)) return ;
		m_LAST_UPDATE_USER_ID = v ;
		markDirty(LAST_UPDATE_USER_ID);
	}

	public String getLastUpdateUser()
	{
	    return m_LAST_UPDATE_USER;
	}
	public void  setLastUpdateUser(String v)
	{
		if(getLastUpdateUser().equals(v)) return ;
		m_LAST_UPDATE_USER = v ;
		markDirty(LAST_UPDATE_USER);
	}

	public String getLastUpdateTime()
	{
	    return m_LAST_UPDATE_TIME;
	}
	public void  setLastUpdateTime(String v)
	{
		if(getLastUpdateTime().equals(v)) return ;
		m_LAST_UPDATE_TIME = v ;
		markDirty(LAST_UPDATE_TIME);
	}



	public String viewId(DBConnection con) throws Exception
	{
		return Value.view(getId());
	}

	public String viewProductType(DBConnection con) throws Exception
	{
		return Value.view(getProductType());
	}

	public String viewTypeName(DBConnection con) throws Exception
	{
		return Value.view(getTypeName());
	}

	public String viewRemark(DBConnection con) throws Exception
	{
		return Value.view(getRemark());
	}

	public String viewTypeLevel(DBConnection con) throws Exception
	{
		return Value.view(getTypeLevel());
	}

	public String viewUpperType(DBConnection con) throws Exception
	{
		return Value.view(getUpperType());
	}

	public String viewStatus(DBConnection con) throws Exception
	{
		return Value.view(getStatus());
	}

	public String viewCreateUserId(DBConnection con) throws Exception
	{
		return Value.view(getCreateUserId());
	}

	public String viewCreateUser(DBConnection con) throws Exception
	{
		return Value.view(getCreateUser());
	}

	public String viewCreateTime(DBConnection con) throws Exception
	{
		return Value.view(getCreateTime());
	}

	public String viewLastUpdateUserId(DBConnection con) throws Exception
	{
		return Value.view(getLastUpdateUserId());
	}

	public String viewLastUpdateUser(DBConnection con) throws Exception
	{
		return Value.view(getLastUpdateUser());
	}

	public String viewLastUpdateTime(DBConnection con) throws Exception
	{
		return Value.view(getLastUpdateTime());
	}



protected ProductTypeManagerBase()
{
}

public void fill(ProductTypeManagerPageData pageData) throws Exception
{

	if(pageData.getId()!=null)
	{	
		setId(pageData.getId());
	}

	if(pageData.getProductType()!=null)
	{	
		setProductType(pageData.getProductType());
	}

	if(pageData.getTypeName()!=null)
	{	
		setTypeName(pageData.getTypeName());
	}

	if(pageData.getRemark()!=null)
	{	
		setRemark(pageData.getRemark());
	}

	if(pageData.getTypeLevel()!=null)
	{	
		setTypeLevel(pageData.getTypeLevel());
	}

	if(pageData.getUpperType()!=null)
	{	
		setUpperType(pageData.getUpperType());
	}

	if(pageData.getStatus()!=null)
	{	
		setStatus(pageData.getStatus());
	}

	if(pageData.getCreateUserId()!=null)
	{	
		setCreateUserId(pageData.getCreateUserId());
	}

	if(pageData.getCreateUser()!=null)
	{	
		setCreateUser(pageData.getCreateUser());
	}

	if(pageData.getCreateTime()!=null)
	{	
		setCreateTime(pageData.getCreateTime());
	}

	if(pageData.getLastUpdateUserId()!=null)
	{	
		setLastUpdateUserId(pageData.getLastUpdateUserId());
	}

	if(pageData.getLastUpdateUser()!=null)
	{	
		setLastUpdateUser(pageData.getLastUpdateUser());
	}

	if(pageData.getLastUpdateTime()!=null)
	{	
		setLastUpdateTime(pageData.getLastUpdateTime());
	}

}

public String getTableName() 
{
	return TABLE_NAME;
}

public String getBackupTableName() 
{
	return BACKUP_TABLE_NAME;
}

public String getBackupSeqName() 
{
	return BACKUP_SEQ_NAME;
}

public java.util.Vector getFields() 
{
	if(m_fields==null)
	{
		m_fields = new Vector();

		m_fields.add(new Field(ID,Value.TYPE_STRING,true,true,32,"���"));

		m_fields.add(new Field(PRODUCT_TYPE,Value.TYPE_STRING,false,true,20,"TYPE_CODE"));

		m_fields.add(new Field(TYPE_NAME,Value.TYPE_STRING,false,true,50,"TYPE_NAME"));

		m_fields.add(new Field(REMARK,Value.TYPE_STRING,false,true,200,"��ע"));

		m_fields.add(new Field(TYPE_LEVEL,Value.TYPE_STRING,false,true,1,"TYPE_LEVEL"));

		m_fields.add(new Field(UPPER_TYPE,Value.TYPE_STRING,false,true,20,"UPPER_TYPE"));

		m_fields.add(new Field(STATUS,Value.TYPE_STRING,false,true,1,"�Ƿ���Ч"));

		m_fields.add(new Field(CREATE_USER_ID,Value.TYPE_STRING,false,true,32,"���������"));

		m_fields.add(new Field(CREATE_USER,Value.TYPE_STRING,false,true,50,"������"));

		m_fields.add(new Field(CREATE_TIME,Value.TYPE_STRING,false,true,20,"����ʱ��"));

		m_fields.add(new Field(LAST_UPDATE_USER_ID,Value.TYPE_STRING,false,true,32,"����޸������"));

		m_fields.add(new Field(LAST_UPDATE_USER,Value.TYPE_STRING,false,true,50,"����޸���"));

		m_fields.add(new Field(LAST_UPDATE_TIME,Value.TYPE_STRING,false,true,20,"����޸�ʱ��"));
	

	}
	return m_fields;
}

public void initObject(java.sql.ResultSet rs) throws Exception
{

	m_ID = getString(rs,ID);

	m_PRODUCT_TYPE = getString(rs,PRODUCT_TYPE);

	m_TYPE_NAME = getString(rs,TYPE_NAME);

	m_REMARK = getString(rs,REMARK);

	m_TYPE_LEVEL = getString(rs,TYPE_LEVEL);

	m_UPPER_TYPE = getString(rs,UPPER_TYPE);

	m_STATUS = getString(rs,STATUS);

	m_CREATE_USER_ID = getString(rs,CREATE_USER_ID);

	m_CREATE_USER = getString(rs,CREATE_USER);

	m_CREATE_TIME = getString(rs,CREATE_TIME);

	m_LAST_UPDATE_USER_ID = getString(rs,LAST_UPDATE_USER_ID);

	m_LAST_UPDATE_USER = getString(rs,LAST_UPDATE_USER);

	m_LAST_UPDATE_TIME = getString(rs,LAST_UPDATE_TIME);

	ms_new_flag = ConstDefine.NO;
}

public Value get(String f)
{

	if(f.equalsIgnoreCase(ID))
	{
		return new Value(getId());
	}

	if(f.equalsIgnoreCase(PRODUCT_TYPE))
	{
		return new Value(getProductType());
	}

	if(f.equalsIgnoreCase(TYPE_NAME))
	{
		return new Value(getTypeName());
	}

	if(f.equalsIgnoreCase(REMARK))
	{
		return new Value(getRemark());
	}

	if(f.equalsIgnoreCase(TYPE_LEVEL))
	{
		return new Value(getTypeLevel());
	}

	if(f.equalsIgnoreCase(UPPER_TYPE))
	{
		return new Value(getUpperType());
	}

	if(f.equalsIgnoreCase(STATUS))
	{
		return new Value(getStatus());
	}

	if(f.equalsIgnoreCase(CREATE_USER_ID))
	{
		return new Value(getCreateUserId());
	}

	if(f.equalsIgnoreCase(CREATE_USER))
	{
		return new Value(getCreateUser());
	}

	if(f.equalsIgnoreCase(CREATE_TIME))
	{
		return new Value(getCreateTime());
	}

	if(f.equalsIgnoreCase(LAST_UPDATE_USER_ID))
	{
		return new Value(getLastUpdateUserId());
	}

	if(f.equalsIgnoreCase(LAST_UPDATE_USER))
	{
		return new Value(getLastUpdateUser());
	}

	if(f.equalsIgnoreCase(LAST_UPDATE_TIME))
	{
		return new Value(getLastUpdateTime());
	}
	
	return null;
}
public void set(String f,Value v) throws Exception
{

	if(f.equalsIgnoreCase(ID))
	{
		setId(v.getString());
	}

	if(f.equalsIgnoreCase(PRODUCT_TYPE))
	{
		setProductType(v.getString());
	}

	if(f.equalsIgnoreCase(TYPE_NAME))
	{
		setTypeName(v.getString());
	}

	if(f.equalsIgnoreCase(REMARK))
	{
		setRemark(v.getString());
	}

	if(f.equalsIgnoreCase(TYPE_LEVEL))
	{
		setTypeLevel(v.getString());
	}

	if(f.equalsIgnoreCase(UPPER_TYPE))
	{
		setUpperType(v.getString());
	}

	if(f.equalsIgnoreCase(STATUS))
	{
		setStatus(v.getString());
	}

	if(f.equalsIgnoreCase(CREATE_USER_ID))
	{
		setCreateUserId(v.getString());
	}

	if(f.equalsIgnoreCase(CREATE_USER))
	{
		setCreateUser(v.getString());
	}

	if(f.equalsIgnoreCase(CREATE_TIME))
	{
		setCreateTime(v.getString());
	}

	if(f.equalsIgnoreCase(LAST_UPDATE_USER_ID))
	{
		setLastUpdateUserId(v.getString());
	}

	if(f.equalsIgnoreCase(LAST_UPDATE_USER))
	{
		setLastUpdateUser(v.getString());
	}

	if(f.equalsIgnoreCase(LAST_UPDATE_TIME))
	{
		setLastUpdateTime(v.getString());
	}
	
}
public String toString()
{
	String msg = "ProductTypeManager=\n";
	msg += "(\r\n";

	msg += "    ID(ID)="+get("ID")+"\r\n";

	msg += "    TYPE_CODE(TYPE_CODE)="+get("TYPE_CODE")+"\r\n";

	msg += "    TYPE_NAME(TYPE_NAME)="+get("TYPE_NAME")+"\r\n";

	msg += "    REMARK(REMARK)="+get("REMARK")+"\r\n";

	msg += "    TYPE_LEVEL(TYPE_LEVEL)="+get("TYPE_LEVEL")+"\r\n";

	msg += "    UPPER_CODE(UPPER_CODE)="+get("UPPER_CODE")+"\r\n";

	msg += "    STATUS(STATUS)="+get("STATUS")+"\r\n";

	msg += "    CREATE_USER_ID(CREATE_USER_ID)="+get("CREATE_USER_ID")+"\r\n";

	msg += "    CREATE_USER(CREATE_USER)="+get("CREATE_USER")+"\r\n";

	msg += "    CREATE_TIME(CREATE_TIME)="+get("CREATE_TIME")+"\r\n";

	msg += "    LAST_UPDATE_USER_ID(LAST_UPDATE_USER_ID)="+get("LAST_UPDATE_USER_ID")+"\r\n";

	msg += "    LAST_UPDATE_USER(LAST_UPDATE_USER)="+get("LAST_UPDATE_USER")+"\r\n";

	msg += "    LAST_UPDATE_TIME(LAST_UPDATE_TIME)="+get("LAST_UPDATE_TIME")+"\r\n";
		
	msg += ")\r\n";
	return msg;
}
public void copyBase(ProductTypeManagerBase srcObj)
{

	setProductType(srcObj.getProductType());

	setTypeName(srcObj.getTypeName());

	setRemark(srcObj.getRemark());

	setTypeLevel(srcObj.getTypeLevel());

	setUpperType(srcObj.getUpperType());

	setStatus(srcObj.getStatus());

	setCreateUserId(srcObj.getCreateUserId());

	setCreateUser(srcObj.getCreateUser());

	setCreateTime(srcObj.getCreateTime());

	setLastUpdateUserId(srcObj.getLastUpdateUserId());

	setLastUpdateUser(srcObj.getLastUpdateUser());

	setLastUpdateTime(srcObj.getLastUpdateTime());

}

public String toXml() throws Exception
{
	String xml = "";
	xml += "<ProductTypeManager>";

	xml += "<Id>"+Value.view(getId())+"</Id>";

	xml += "<ProductType>"+Value.view(getProductType())+"</ProductType>";

	xml += "<TypeName>"+Value.view(getTypeName())+"</TypeName>";

	xml += "<Remark>"+Value.view(getRemark())+"</Remark>";

	xml += "<TypeLevel>"+Value.view(getTypeLevel())+"</TypeLevel>";

	xml += "<UpperType>"+Value.view(getUpperType())+"</UpperType>";

	xml += "<Status>"+Value.view(getStatus())+"</Status>";

	xml += "<CreateUserId>"+Value.view(getCreateUserId())+"</CreateUserId>";

	xml += "<CreateUser>"+Value.view(getCreateUser())+"</CreateUser>";

	xml += "<CreateTime>"+Value.view(getCreateTime())+"</CreateTime>";

	xml += "<LastUpdateUserId>"+Value.view(getLastUpdateUserId())+"</LastUpdateUserId>";

	xml += "<LastUpdateUser>"+Value.view(getLastUpdateUser())+"</LastUpdateUser>";

	xml += "<LastUpdateTime>"+Value.view(getLastUpdateTime())+"</LastUpdateTime>";
	
	xml += "</ProductTypeManager>";
	return xml;
}

}
